<template>
  <div class="cart">
    <!-- 顶部 -->
    <nav-bar class="nav-bar">
      <div slot="center">购物车({{cartLength}})</div>
    </nav-bar>
    <!-- 商品列表 -->
    <cart-list />
    <!-- 底部工具栏 -->
    <cart-bottom-bar />
  </div>
</template>

<script>
import NavBar from "@/components/common/navbar/NavBar";
import CartList from "./childComps/CartList";
import CartBottomBar from "./childComps/CartBottomBar";

import { mapGetters } from "vuex";

export default {
  data() {
    return {};
  },
  computed: {
    ...mapGetters(["cartLength"])
  },
  components: {
    NavBar,
    CartList,
    CartBottomBar
  },
  methods: {}
};
</script>

<style lang='scss' scoped>
@import "@/assets/css/extend.scss";

.cart {
  .nav-bar {
    @extend .zhubg_color;
    font-weight: 700;
    color: #fff;
  }
}
</style>